package com.liannong.config;

import com.liannong.service.BlockchainStorageService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

@Configuration
@EnableScheduling
public class ApplicationConfig {
    
    @Bean
    public CommandLineRunner initBlockchainStorage(BlockchainStorageService blockchainStorageService) {
        return args -> {
            // 系统启动时初始化区块链存储服务
            blockchainStorageService.init();
        };
    }
} 